package com.youkeyi.ddy.cloud.common.api.basic.pub.tag;

import com.youkeyi.ddy.cloud.common.api.basic.pub.tag.dto.PublicTagListCloudDto;
import com.youkeyi.ddy.cloud.common.api.basic.pub.tag.dto.PublicTagQueryBindListCloudDto;
import com.youkeyi.ddy.cloud.common.api.basic.pub.tag.dto.PublicTagTreeItemCloudDto;
import com.youkeyi.ddy.cloud.common.api.basic.pub.tag.param.*;
import com.youkeyi.ddy.cloud.common.response.ResponseContent;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;


/**
 * PublicTagCloudService
 *
 * @Author liuxiawang
 * @Date 2024/2/19 2:31 PM
 * @Location shenzhen.china
 */
@RestController
@FeignClient(value = "YOUKEYI-DDY-CLOUD-BASIC-PUBLIC", fallback = PublicTagCloudServiceFallback.class)
@RequestMapping("/public/tag")
public interface PublicTagCloudService {

    /**
     * 查询标签列表.
     *
     * @param param the param
     * @return the tag list cloud dto
     */
    @PostMapping(value = "/query")
    public abstract PublicTagListCloudDto query(@RequestBody PublicTagQueryCloudParam param);

    /**
     * 查询标签树.
     *
     * @param param the param
     * @return the tag list cloud dto
     */
    @PostMapping(value = "/query/tree")
    public abstract List<PublicTagTreeItemCloudDto> queryTree(@RequestBody PublicTagQueryTreeCloudParam param);

    /**
     * 新增标签.
     *
     * @param param the param
     * @return the response content
     */
    @PostMapping(value = "/create")
    public abstract ResponseContent create(@RequestBody PublicTagCreateCloudParam param);

    /**
     * 编辑标签.
     *
     * @param param the param
     * @return the response content
     */
    @PostMapping(value = "/update")
    public abstract ResponseContent update(@RequestBody PublicTagUpdateCloudParam param);

    /**
     * 删除标签.
     *
     * @param param the param
     * @return the response content
     */
    @PostMapping(value = "/delete")
    public abstract ResponseContent delete(@RequestBody PublicTagDeleteCloudParam param);




    /**
     * 绑定标签.
     *
     * @param param the param
     * @return the response content
     */
    @PostMapping(value = "/bind")
    public abstract ResponseContent bind(@RequestBody PublicTagBindCloudParam param);

    /**
     * 解绑标签.
     *
     * @param param the param
     * @return the response content
     */
    @PostMapping(value = "/unbind")
    public abstract ResponseContent unbind(@RequestBody PublicTagUnbindCloudParam param);

    /**
     * 查询绑定的标签.
     *
     * @param param the param
     * @return the response content
     */
    @PostMapping(value = "/query/bind")
    public abstract PublicTagQueryBindListCloudDto queryBind(@RequestBody PublicTagQueryBindCloudParam param);

}
